package cn.liontalk.receiver;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;

/**
 * @author: 周哲
 * @package: cn.liontalk.receiver
 * @description:
 * @date: 2019/1/10 19:41
 * @version: V1.0
 */
@Component
@RabbitListener(
        bindings = @QueueBinding(
                value = @Queue(value = "${mq.config.queue.info}",autoDelete = "true"),
                exchange = @Exchange(value = "${mq.config.exchange}",type= ExchangeTypes.TOPIC),
                key = "*.log.info"
        )
)
public class InfoReceiver {
    @RabbitHandler
    public void receiveMessage(String message){
        System.out.println("....Info....Receiver:" + message);
    }
}
